﻿using Dapper;
using System;
using BCEntity.Trading.Purchase.GoodsPurchasePaidRecord;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace BCData.Trading.Purchase.GoodsPurchasePaidRecord
{
    /// <summary>
    /// 商品采购支付记录
    /// </summary>
    public interface IGoodsPurchasePaidRecordData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="goodsPurchasePaidRecordId">商品采购支付记录Id</param>
        Task<bool> Exists(long goodsPurchasePaidRecordId);
        /// <summary>
        /// 增加商品采购支付记录
        /// </summary>
        /// <param name="entity">商品采购支付记录信息</param>
        Task<GoodsPurchasePaidRecordEntity> Add(GoodsPurchasePaidRecordEntity entity);
        /// <summary>
        /// 更新商品采购支付记录
        /// </summary>
        /// <param name="entity">商品采购支付记录信息</param>
        Task<GoodsPurchasePaidRecordEntity> Update(GoodsPurchasePaidRecordEntity entity);
        /// <summary>
        /// 删除商品采购支付记录
        /// </summary>
        /// <param name="goodsPurchasePaidRecordId">商品采购支付记录Id</param>
        Task<bool> Delete(long goodsPurchasePaidRecordId);
        /// <summary>
        /// 获取商品采购支付记录
        /// </summary>
        /// <param name="goodsPurchasePaidRecordId">商品采购支付记录Id</param>
        Task<GoodsPurchasePaidRecordEntity> GetEntity(long goodsPurchasePaidRecordId);
        /// <summary>
        /// 获取商品采购支付记录分页列表
        /// </summary>
        /// <param name="goodsPurchaseId">商品采购单Id</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        Task<(IEnumerable<GoodsPurchasePaidRecordEntity>, int)> Query(long goodsPurchaseId,DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法
    }


}